package com.heihei.security.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

/**
 * 登录controller
 *
 * @author duanhengfei
 * @version 1.0
 * @date 2020/7/4 11:46
 * @since JDK1.8
 */
@RestController
public class LoginController {
    /**
     * 登录
     *
     * @author duanhengfei
     * @date 2020年07月04日 12:00:13
     */
    @PostMapping(value = "/login-success", produces = {"text/plain;charset=UTF-8"})
    public String loginSuccess(){
        return "登录成功";
    }

    /**
     * 访问资源测试
     *
     * @author duanhengfei
     * @date 2020年07月04日 12:00:13
     */
    @GetMapping(value = "/resource/r1", produces = {"text/plain;charset=UTF-8"})
    public String test01(){
        return "访问资源r1";
    }

    /**
     * 访问资源测试
     *
     * @author duanhengfei
     * @date 2020年07月04日 12:00:13
     */
    @GetMapping(value = "/resource/r2", produces = {"text/plain;charset=UTF-8"})
    public String test02(){
        return "访问资源r2";
    }
}